<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Document</title>
</head>
<style>
    html{
        /*  设置当前网页的视距为800px，人眼距离网页的距离 */
        perspective: 800px;
    }
    body{
        background-color: rgb(202, 202, 202);
    }
    .box{
        width: 220px;
        height: 220px;
        background-color:rgb(255, 255, 255);
        margin: 50px auto;
        transition: 2s; 
    }
    body:hover .box{
        /*  旋转 */
        /* transform: rotateX(45deg); */
        transform: rotateY(188deg) rotateY(180deg);
        /* 是否显示背面 */
        backface-visibility: hidden;
    }
    .box1{
        width: 220px;
        height: 300px;
        background-color:rgb(255, 255, 255);
        float: left;
        margin: 0 10px;
        transition: transform .3s;
    }
    .box1:hover{
        /* 位移 */
        transform: translateY(-10px);
        box-shadow: 0 0 10px rgba(0, 0, 0, .3);
    }
    .box2{
        width: 220px;
        height: 300px;
        background-color:rgb(255, 255, 255);
        float: left;
        margin: 0 10px;
        transition:2s;
    }
    body:hover .box2{
        /* 近大远小 */
        transform: translateZ(-100px);
    }
</style>
<body>
    <div class="box">

    </div>
    <div class="box1">

    </div>
    <div class="box2">
        
    </div>
</body>
</html>